package org.git.movie.controller;

import org.git.movie.annotations.Verify;
import org.git.movie.form.ListSearchForm;
import org.git.movie.service.FfVodService;
import org.git.movie.util.BaseController;
import org.git.movie.util.BaseResponse;
import org.git.movie.vo.FfVodListDto;
import org.git.movie.vo.FfVodReadDto;
import org.git.movie.vo.PageDto;
import org.git.movie.vo.VodRelationList;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 */
@RestController
@RequestMapping("/video")
public class FfVodSearchController extends BaseController {

    @Resource
    private FfVodService ffVodService;

    @PostMapping("/dosearch.do")
    public BaseResponse<PageDto<FfVodListDto>> dosearch(
            @Verify(param="pageNo",rule="required|min(1)") int pageNo,
            @Verify(param="pageSize",rule="required|min(3)|max(60)") int pageSize,
               @Verify(param="key",rule="required") String key
    ){

        PageDto<FfVodListDto> pages =  ffVodService.dosearch(pageNo,pageSize,key);
        return   ok(pages);

    }

}

